home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10812 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: isonews.bbn.hp.com!hpbblb!news
  2. From: Matthias Dittrich <matti>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Need help making C program, C++
  5. Date: 11 Mar 1996 12:25:39 GMT
  6. Organization: Hewlett-Packard Co.
  7. Message-ID: <4i1643$ba5@hpbblb.bbn.hp.com>
  8. References: <313E7AE3.6F9C@cp.duluth.mn.us>
  9. NNTP-Posting-Host: trabant.bbn.hp.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1N (X11; I; HP-UX A.09.07 9000/712)
  14. X-URL: news:313E7AE3.6F9C@cp.duluth.mn.us
  15.  
  16. Yan Saillard <kannun@cp.duluth.mn.us> wrote:
  17. >............
  18. >*Warning CALK.CPP 19: Style of function definition is now obsolete
  19. >int doOp(o,r) char o; int r;
  20.  
  21. Change this to:
  22. int doOp(char o,int r)
  23.  
  24. >
  25. >*Warning CALK.CPP 30: Style of function definition is now obsolete:
  26. >void showResult(r) int r;
  27. >
  28. >What would be the way C++ defines functions?
  29. >
  30. >*Error CALK.CPP 39: Function 'getchar' should have a prototype
  31. >while((op = getchar()) != 'q')
  32. >..............
  33. If you ony want to compile this program with a c++ compiler, use ANSI function
  34. prototypes and include the correct header files. I don't know where getchar is
  35. located (you are using MS-DOS, I'm working with an operating system :-), but
  36. it should be stdio.h.
  37. But if you want to write a c++ program, you have to redesing it complete.
  38.  
  39. Good luck,
  40. Matthias
  41.  
  42.